package mian;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainTest {
    public static void main(String[] args) {
        // 启动Spring容器
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        // 获取Product bean并输出
        Product product = (Product) context.getBean("product");
        System.out.println("Product信息: " + product);

        // 获取Student bean并输出
        Student student = (Student) context.getBean("student");
        System.out.println("Student信息: " + student);
    }
}

